Style rules are used to apply a style to elements of a markup language document or a collection of markup language documents. Style rules typically are composed of a selector and a set of one or more property name/value pairs. The selector is used to select which of the elements of the corresponding document(s) that the style rule applies to, and the property name/value pairs set the appropriate property values for the selected elements.
Style sheets define a collection of one or more style rules. For instance, Cascading Style Sheets (CSS) may be used to apply one or more style rules to HyperText Markup Language (HTML) documents. However, style may originate from other sources as well. For instance, styles may be applied by default by the browser, styles may be inherited values which the element inherits from a parent or ancestor element, or styles that are applied at runtime via some executable (such as Javascript) which alters the style attribute of the element. Thus, there is potentially a variety of potential style sources that may apply to any given property of a given element. In the case of multiple conflicting styles, there is a set of conflict resolution rules which governs which style will be applied.